﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="mfGoodsSearch.aspx.cs"
    Inherits="msBsc.WebUi.mfGoodsSearch" %>

<!DOCTYPE HTML>
<html>
<head>
    <title>手机优速购商城</title>
    <%=getMeta()%>
    <link rel="stylesheet" type="text/css" href="/themes/mStyle1/mGlobal.css" charset="gbk" />
    <%=getBodyBeforeJs()%>
    <script src="/??jqPlugin/js/jquery-1.8.3.min.js,js/jBase.js,js/jmPage.js,themes/Style1/jsQt.js,jqPlugin/js/laytpl.js"
        type="text/javascript"></script>
    <script type="text/javascript">
        $(window).load(function () {
        }); 
    </script>
    <!--head fix rgn-->
    <style type="text/css">
    </style>
 <link rel="stylesheet" href="/themes/mStyle1/mSearch.css" /> 
<%--    <link rel="stylesheet" href="/themes/Style1/schList.css" />--%>
    <base target="_self" />
</head>
<body>
    <div class="viewport">
    <input type="hidden" id="sort" value="">
    <input type="hidden" id="datacurrpage" value="">
    <input type="hidden" id="txtQuery" value="">
        <header class="search-bar" style="">
            <form id="J_shSearchForm" method="get" action="/m/mp_GoodsSearch.htm">
            <div class="search-bar-tbl">
                <div class="search-bar-cell-3">
                    <a href="javascript:void(0);" onclick="history.go(-1);" style="color: #fff; vertical-align: middle; line-height: 28px; font-size: 16px; padding-left:6px; padding-right:6px;">&lt;&lt;</a>
                </div>
                <div class="search-bar-cell-2">
                    <div class="search-textfile">
                        <a id="searchbtn" href="javascript:void(0);" onclick="J_shSearchForm.submit();" class="btn-home-search">
                        </a>
                        <input autocomplete="off" name="f" id="f" class="search-textfile-input">
                    </div>
                </div>
                <div class="search-bar-cell-3" >
                    <a href="javascript:void(0);" class="schListBtn schListBtn-type1"></a>
                </div>
                <div class="search-bar-cell-3" id="myFilterBtn">
                    <a href="javascript:void(0);" class="schFilterBtn"></a>
                </div>
            </div>
            </form>
            <div class="floor " id="divmymFilter" style="display: none; margin-top: 3px; margin-bottom: 3px;">
                <div id="content_goods_form">
                </div>
            </div>
            <script type="text/javascript">
                function initmymmall() {
                    $("#myFilterBtn").live("click", function () {
                        $("#divmymFilter").toggle('fast');
                    });
                };
                initmymmall();

                function initschListBtn() {
                    $(".schListBtn").click(function () {
                        var _self = $(this);
                        if (_self.hasClass("schListBtn-type1")) {
                            _self.removeClass("schListBtn-type1").addClass("schListBtn-type2");
                            $("#J_ItemList").removeClass("album").addClass("list");
                        } else {
                            _self.removeClass("schListBtn-type2").addClass("schListBtn-type1");
                            $("#J_ItemList").removeClass("list").addClass("album");
                        }
                    });
                };
                initschListBtn();




            </script>
        </header>

    <div class="filter" id="J_Filter" style="display:none;"> 
    <ul class="filter-inner"> 
     <li class="filter-cur"><a href="javascript:;" title="点击后恢复默认排序">综合<span><i class="f-ico-triangle-mt "></i><i class="f-ico-triangle-mb "></i></span></a></li> 
     <li><a href="javascript:;" title="点击后按人气从高到低">人气<span><i class="f-ico-triangle-mt "></i><i class="f-ico-triangle-mb "></i></span></a></li> 
     <li><a href="javascript:;" title="点击后按月销量从高到低">销量<span><i class="f-ico-triangle-mt "></i><i class="f-ico-triangle-mb "></i></span></a></li> 
     <li><a href="javascript:;" title="点击后按价格从低到高">价格<span><i class="f-ico-triangle-mt "></i><i class="f-ico-triangle-mb "></i></span></a></li> 
    </ul> 
   </div> 
    
             
   <div class="srp j_autoResponsive_container m-ks-autoResponsive-container m-animation album" id="J_ItemList" style="opacity: 1;">  
   </div> 
   <div id="J_trade_pagenation"></div>

   <%=GetGoodsListJavaScript()%>
   
            <script type="text/javascript"> 

                var goodslisttemphtml = "";
                function doBoundGoodsList(_data) {
                    if (goodslisttemphtml && goodslisttemphtml != "") {
                        laytpl(goodslisttemphtml).render(_data, function (render) {
                            $("#J_ItemList").html(render);
                        });
                    } else {
                        jQuery.loadHtml("/mMall/Template/mSysGoodsSearchList.html").done(function (_rethtml) {
                            goodslisttemphtml = HtmlUtil.htmlDecode(_rethtml);
                            laytpl(goodslisttemphtml).render(_data, function (render) {
                                $("#J_ItemList").html(render);
                            });
                        });
                    }
                    $("#datacurrpage").val(_data.page);
                    createPaging('J_trade_pagenation', _data.page, _data.total, function (_topagenum) { doToPageNm(_topagenum); });
                };

                function doToPageNm(_pNum) {
                    var sortt = "";
                    if ($(".fSort .fSort-cur").length > 0) {
                        sortt = $(".fSort .fSort-cur").attr("sort-data") + " " + $(".fSort .fSort-cur").attr("sort-upd");
                    }
                    window.location.href = '/mp_GoodsSearch.htm?' + $("#txtQuery").val()
            + "&page=" + (_pNum || $("#datacurrpage").val())
            + "&p1=" + $("#start_price").val()
            + "&p2=" + $("#end_price").val()
            + "&sort=" + sortt;
                    //            var _jsParam = new jsonRow();
                    //            _jsParam.AddCell("ACTION", "doToPageNum");
                    //            _jsParam.AddCell("F_QUERY", $("#txtQuery").val());
                    //            _jsParam.AddCell("start_price", $("#start_price").val());
                    //            _jsParam.AddCell("end_price", $("#end_price").val()); 
                    //            _jsParam.AddCell("NEW_PAGE_NUM", _pNum || $("#datacurrpage").val());
                    //            _jsParam.AddCell("PAGE_ROW_COUNT", "20");
                    //            ajaxComm(_jsParam);
                };

                doBoundGoodsList(goodsListData);
            </script>



   
  <div class="ptpt"></div>
<%--   <section class="list-pagination">
    <div class="pagenav-wrapper j-mdv" id="J_PageNavWrap">
     <div class="pagenav-content"> 
      <div class="pagenav" id="J_PageNav"> 
       <div class="p-first p-gray"> 
        <a>首页</a> 
       </div> 
       <div class="p-prev p-gray"> 
        <a atpanel="2,pageup,,,footer,20,footer,">上一页</a> 
       </div> 
       <div class="pagenav-cur"> 
        <div class="pagenav-text"> 
         <span>1/100</span> 
         <i></i> 
        </div> 
        <select atpanel="3,pagechoose,,,footer,20,footer," class="pagenav-select"> <option>第1页</option> <option>第2页</option> <option>第3页</option> <option>第4页</option> <option>第5页</option> <option>第6页</option> <option>第7页</option> <option>第8页</option> <option>第9页</option> <option>第10页</option> <option>第11页</option> <option>第12页</option> <option>第13页</option> <option>第14页</option> <option>第15页</option> <option>第16页</option> <option>第17页</option> <option>第18页</option> <option>第19页</option> <option>第20页</option> <option>第21页</option> <option>第22页</option> <option>第23页</option> <option>第24页</option> <option>第25页</option> <option>第26页</option> <option>第27页</option> <option>第28页</option> <option>第29页</option> <option>第30页</option> <option>第31页</option> <option>第32页</option> <option>第33页</option> <option>第34页</option> <option>第35页</option> <option>第36页</option> <option>第37页</option> <option>第38页</option> <option>第39页</option> <option>第40页</option> <option>第41页</option> <option>第42页</option> <option>第43页</option> <option>第44页</option> <option>第45页</option> <option>第46页</option> <option>第47页</option> <option>第48页</option> <option>第49页</option> <option>第50页</option> <option>第51页</option> <option>第52页</option> <option>第53页</option> <option>第54页</option> <option>第55页</option> <option>第56页</option> <option>第57页</option> <option>第58页</option> <option>第59页</option> <option>第60页</option> <option>第61页</option> <option>第62页</option> <option>第63页</option> <option>第64页</option> <option>第65页</option> <option>第66页</option> <option>第67页</option> <option>第68页</option> <option>第69页</option> <option>第70页</option> <option>第71页</option> <option>第72页</option> <option>第73页</option> <option>第74页</option> <option>第75页</option> <option>第76页</option> <option>第77页</option> <option>第78页</option> <option>第79页</option> <option>第80页</option> <option>第81页</option> <option>第82页</option> <option>第83页</option> <option>第84页</option> <option>第85页</option> <option>第86页</option> <option>第87页</option> <option>第88页</option> <option>第89页</option> <option>第90页</option> <option>第91页</option> <option>第92页</option> <option>第93页</option> <option>第94页</option> <option>第95页</option> <option>第96页</option> <option>第97页</option> <option>第98页</option> <option>第99页</option> <option>第100页</option> </select> 
       </div> 
       <div class="p-next"> 
        <a atpanel="4,pagedn,,,footer,20,footer,">下一页</a> 
       </div> 
       <div class="p-end"> 
        <a atpanel="5,pagelast,,,footer,20,footer,">末页</a> 
       </div> 
      </div>
     </div>
    </div>
   </section> 
--%>

    </div>

    <%=GetTopFormJavaScript() %>
    
            <script type="text/javascript"> 
                    jQuery.loadHtml("/mMall/Template/mSysGoodsSearchForm.html").done(function (_rethtml) { 
                        var tpl = HtmlUtil.htmlDecode(_rethtml);
                        laytpl(tpl).render(topFormData, function (render) {
                            $("#content_goods_form").html(render);
                        });
                    }); 
                
            </script>
</body>
<%=getBodyAfterJs() %>
</html>
